$OpenBSD: patch-libdocument_ev-document-misc_c,v 1.1 2016/06/27 11:20:49 jasper Exp $

error: #pragma GCC diagnostic not allowed inside functions

--- libdocument/ev-document-misc.c.orig	Mon Jun 27 13:10:24 2016
+++ libdocument/ev-document-misc.c	Mon Jun 27 13:12:36 2016
@@ -528,8 +528,10 @@ ev_document_misc_format_date (GTime utime)
 	char s[256];
 	const char fmt_hack[] = "%c";
 	size_t len;
+#if defined(__GNUC__) && (__GNUC__ > 4)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wformat-y2k"
+#endif
 #ifdef HAVE_LOCALTIME_R
 	struct tm t;
 	if (time == 0 || !localtime_r (&time, &t)) return NULL;
@@ -539,7 +541,9 @@ ev_document_misc_format_date (GTime utime)
 	if (time == 0 || !(t = localtime (&time)) ) return NULL;
 	len = strftime (s, sizeof (s), fmt_hack, t);
 #endif
+#if defined(__GNUC__) && (__GNUC__ > 4)
 #pragma GCC diagnostic pop
+#endif
 
 	if (len == 0 || s[0] == '\0') return NULL;
 
